# -*- coding: utf-8 -*-

"""
@author: jj
@Remark: 设备类型扩充属性管理
"""
from app.device.models import DeviceTypeAttr
from dvadmin.utils.serializers import CustomModelSerializer
from dvadmin.utils.viewset import CustomModelViewSet


class DevicetypeattrSerializer(CustomModelSerializer):
    """
    序列化器
    """

    class Meta:
        model = DeviceTypeAttr
        fields = "__all__"
        read_only_fields = ["id"]


class DevicetypeattrViewSet(CustomModelViewSet):
    """
    设备类型扩充属性接口
    list:设备类型扩充属性查询
    create:设备类型扩充属性新增
    update:设备类型扩充属性修改
    retrieve:设备类型扩充属性单例
    destroy:设备类型扩充属性删除
    multiple_delete:设备类型扩充属性多删
    """
    queryset = DeviceTypeAttr.objects.all()
    serializer_class = DevicetypeattrSerializer
    # filter_fields = ['creator_id']

    # permission_classes = []
